and ensure a final newline.
(when
(condition-case nil
(progn
- (base64-decode-region (1+ header-end) (point))
+ (base64-decode-region
+ (1+ header-end)
+ (save-excursion
+ ;; Prevent base64-decode-region
+ ;; from removing newline characters.
+ (skip-chars-backward "\n\t ")
+ (point)))
t)
(error nil))
(goto-char header-end)
(goto-char (point-min))
(while (search-forward "\n\^_" nil t); single char
(replace-match "\n^_")))); 2 chars: "^" and "_"
+ (or (bolp) (newline)) ; in case we lost the final newline.
(insert ?\^_)
(setq last-coding-system-used nil)
(or rmail-enable-mime